package by.yakusekmaxim.bookgid.services;

import java.util.List;

import org.springframework.transaction.annotation.Transactional;

import by.yakusekmaxim.bookgid.datamodel.Book;
import by.yakusekmaxim.bookgid.datamodel.Review;
import by.yakusekmaxim.bookgid.datamodel.UserAccount;

public interface ReviewService {

	Review get(Long id);

    @Transactional
    void saveOrUpdate(Review review);

    @Transactional
    void delete(Review review);

    @Transactional
    void deleteAll();
    
    @Transactional
    List<Review> getAllReview(Book book, boolean ascending);
    
    Review getReview(Book book,UserAccount user);

}
